package main.java.Fzy.Test;

public class Test05 {
    public static void main(String[] args) {

        double key = 3.017;
        key = key * 1000;
        int key2 =(int) (key+0.5);
        double key3 = key2/1000.0;
        if(key3 == key/1000){
            System.out.println((int) key/1000);
        }else {
            System.out.println(key3);
        }
    }
}
